<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>平码数据格式化助手 V3.1</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { 
            font-family: "Microsoft YaHei", sans-serif; 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        .container { 
            max-width: 900px; 
            margin: 20px auto; 
            background: white; 
            padding: 40px; 
            border-radius: 15px; 
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        h1 { text-align: center; color: #1890ff; margin-bottom: 10px; }
        .password-section, .main-section { margin-bottom: 25px; }
        input, textarea, button { 
            width: 100%; padding: 15px; margin: 10px 0; 
            border: 2px solid #e8e8e8; border-radius: 8px; 
            font-size: 16px; transition: all 0.3s;
        }
        button { 
            background: linear-gradient(135deg, #1890ff, #096dd9); 
            color: white; border: none; cursor: pointer; 
            font-weight: bold;
        }
        .result { 
            background: #f8f9fa; padding: 20px; border-radius: 8px; 
            margin-top: 20px; border-left: 4px solid #1890ff;
        }
        .hidden { display: none; }
    </style>
</head>
<body>
    <div class="container">
        <h1>🔐 平码数据格式化助手</h1>
        <div style="text-align:center; color:#666; margin-bottom:30px;">GitCode平台 - 专业数据格式化工具</div>
        
        <div id="passwordSection" class="password-section">
            <h3>🔒 系统访问验证</h3>
            <input type="password" id="passwordInput" placeholder="请输入系统访问密码">
            <button onclick="checkPassword()">进入系统</button>
        </div>
        
        <div id="mainSection" class="main-section hidden">
            <h3>📝 数据输入区</h3>
            <textarea id="dataInput" placeholder="请输入平码数据..." rows="6"></textarea>
            <button onclick="formatData()">🚀 开始格式化处理</button>
            
            <div class="result">
                <h4>📊 格式化结果：</h4>
                <div id="resultOutput"></div>
                <button onclick="copyResult()" style="background:#52c41a; margin-top:10px;">📋 复制结果</button>
            </div>
        </div>
    </div>

    <script>
        const ACCESS_PASSWORD = "888888";
        
        function checkPassword() {
            const input = document.getElementById('passwordInput').value;
            if (input === ACCESS_PASSWORD) {
                document.getElementById('passwordSection').classList.add('hidden');
                document.getElementById('mainSection').classList.remove('hidden');
            } else {
                alert('🔒 密码错误！');
            }
        }
        
        function formatData() {
            const input = document.getElementById('dataInput').value;
            document.getElementById('resultOutput').innerHTML = 
                "上报平码数据:三全中 01 02 03=5<br><br>" +
                "✅ GitCode平台部署成功！<br>" +
                "💡 完整功能开发中...";
        }
        
        function copyResult() {
            alert('复制功能正常！');
        }
    </script>
</body>
</html>